home *** CD-ROM | disk | FTP | other *** search
- #ifndef __PROTOVIEWS__
- #define __PROTOVIEWS__
-
- #include <UGridView.h>
-
- class TLineData: public TObject
- {
- private:
- long fOffset;
- TFile *fMyFile;
- public:
- virtual pascal void ILineData(const long offset,
- TFile *aFile);
- virtual pascal void GetText(CStr255 &theText);
- };
-
- class TLineServer: public TObject
- {
- private:
- TList *fLineList;
- TFile *fMyFile;
- public:
- virtual pascal void ILineServer(CStr255 &fileName);
- virtual pascal void GetALine(const ArrayIndex theLine,
- CStr255 &theText);
- virtual pascal ArrayIndex GetLineCount();
- virtual pascal void Free();
-
- };
-
- class TLineView: public TView
- {
- private:
- TLineServer *fMyLineServer;
- public:
- virtual pascal void ILineView(TLineServer *aLineServer);
- virtual pascal void Draw(const VRect& area);
- };
-
- // The TListView class implements the line server approach for the
- // single column "TTextListView"
-
- class TListView: public TTextListView
- {
- private:
- TLineServer *fMyLineServer;
- public:
- virtual pascal void IListView(TLineServer *aLineServer);
- virtual pascal void GetItemText(short item,
- CStr255& aString);
- };
-
-
- // The TMatrixView implements the line server approach for TTextGridView
- // type views. The assumption is that the data in the file is in ROW order,
- // that is, for a three column grid:
- // Element r1,c1
- // Element r1,c2
- // Element r1,c3
- // Element r2,c1
- // Element r2,c2
- // Element r2,c3 etc.
-
- class TMatrixView: public TTextGridView
- {
- private:
- TLineServer *fMyLineServer;
- public:
- virtual pascal void IMatrixView(TLineServer *aLineServer);
- virtual pascal void GetText(GridCell aCell, CStr255& aString);
- };
- #endif